<template>
	<view class="group_company" style="background-color: #f6f6f6;">
		<view class="contractinfo">
			<view class="constatus">
				<view class="con_status" v-if="info && info.examine_status == 0">
					待审核
				</view>
				<view class="con_status" v-if="info && info.examine_status == 3">
					审核中
				</view>
				<view class="con_status" v-if="info && info.examine_status == 1">
					审核通过
				</view>
				<view class="con_status warnstatus" v-if="info && info.examine_status == 2">
					审核未通过
				</view>
				<view class="con_status warnstatus" v-if="info && info.examine_status == 4">
					已撤回
				</view>
				<view class="con_status warnstatus" v-if="info && info.examine_status == 9">
					终止订单
				</view>
			</view>
			<view class="conbox">
				<view class="title">
					订单详情
				</view>
				<view class="conbox_top">
					<view class="conbox_left">
						<view class="content" style="color: #666;" >
							订单单号：<text user-select="true" @longpress="$copyText">{{info && info.purchase_code}}</text>
						</view>
						<view class="content" style="color: #666;" >
							订单金额：<text>￥{{info && info.real_money}}</text>
						</view>
						<view class="content" >
							返款金额：<text>￥{{info && info.back_money}}</text>
						</view>
						<view class="content">
							已回款：<text>￥{{info && info.receivables ? info.receivables.repayment_money : ''}}   </text> 
						</view>
						<view class="content">
							待回款：<text :style="info && info.receivables && info.receivables.be_money > 0 ? 'color:red' : ''">￥{{info && info.receivables ? info.receivables.be_money : ''}}</text>
						</view>
						<view class="li_text" >
							<view class="protext" style="color: #999;">
								回款进度：<text>({{info && info.receivables ? info.receivables.ratio : ''}}%)</text>
							</view>
							<view class="pro_out" v-if="info.receivables">
								<view class="pro_in" :style="{width:(info && info.receivables.ratio >= 100 ? 100 : info.receivables.ratio) +'%'}"></view>
							</view>
						</view>
						<view class="content" v-if="info.serials != ''">锁编码：<text user-select="true" @longpress="$copyText">{{info.serials || ''}}</text></view>
						<view class="content" v-if="info.serials != ''">锁内码：<text user-select="true" @longpress="$copyText">{{info.lock_code || ''}}</text></view>
						<view class="content">
							创建时间：<text>{{info && info.order_date ? info.order_date : ''}}</text>
						</view>
						<view class="content">
							备注：<text user-select="true" @longpress="$copyText">{{info && info.note ? info.note : ''}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 团队信息 -->
		<more-pop 
			relation_type="contract" 
			v-if="false" 
			:relation_id="id" 
			:staffList="info.show_staff_data"
			:remindPeople="remindPeople"
			@delExamine="delExamine"
			@clearRemindlist="clearRemindlist"
			style="margin-bottom: 20rpx;"
		></more-pop>
		<view class="contractinfo" v-if="info.is_examine == 1">
			<view class="conbox">
				<view class="title">
					操作
				</view>
				<!-- <view class="button" style="margin:24rpx auto;" v-if="info.is_start != 1 && info.check_status == 2"  @click="toShencheng">客户已确认，去发货</view> -->
				<view class="button_warp" style="margin-top:30rpx;" >
					<view class="btn jujue" @click="toRefuse">审核拒绝</view>
					<view class="btn tongyi" @click="toPass">审核通过</view>
				</view>
			</view>
		</view>
		<view class="tabinfo" @click="toKehuInfo" >
			<view class="tableft">
				<view class="title" style="margin-left: 40rpx;min-width: 20%;">
					关联客户
				</view>
				<view class="name">{{info.customers && info.customers.customer_name}}</view>
			</view>
		</view>
		<view class="tabinfo" @click="toBusinessDetail" v-if="info.business">
			<view class="tableft">
				<view class="title" style="margin-left: 40rpx;">
					关联商机
				</view>
				<view class="name">{{info.business && info.business.name}}</view>
			</view>
		</view>
		<view class="tabwarp">
			<scroll-view v-if="false" scroll-x="true" style="width:750rpx;">
				<view class="tablist_new_list">
					<!-- <view class="tabtn" @click="changeTab(0)" :class="{'tabtn_active':active == 0}">跟进动态</view> -->
					<!-- <view class="tabtn" @click="changeTab(1)" :class="{'tabtn_active':active == 1}">基本信息</view> -->
					<!-- <view class="tabtn" @click="changeTab(2)" :class="{'tabtn_active':active == 2}">相关附件</view> -->
				</view>
			</scroll-view>
			<!-- 跟进动态 -->
			<scroll-view scroll-y="true" class="scrollbox" v-show="active == 0">
				<follow-info v-if="info.id" :info="info" :type="3"></follow-info>
			</scroll-view>
			<!-- 基本信息 -->
			<scroll-view scroll-y="true" class="scrollbox" v-show="active == 1">
				<base-info :info="info" v-if="info.id" :paymentlist="planList" :plan_list="plan_list" :paymentApproval="payment_approval"></base-info>
			</scroll-view>
			<!-- 相关附件 -->
			<scroll-view scroll-y="true" class="scrollbox" v-show="active == 2">
				<!-- 相关附件 -->
				<view class="fileWarp">
					<view class="title" style="margin-left: 40rpx;">相关附件：</view>
					<view class="doc_item" v-for="(item,index) in fileList" :key="index">
						<image :src="BASE_IMG_URL+'/index/file-clip.png'" class="remarkimg"></image>
						<view class="doc_name" @click="toLookFile(item)">{{item.name}}</view>
						<image :src="BASE_IMG_URL+'/index/delete.png'" @click="delFile(item.id)" class="deleimg"></image>
					</view>
				</view>
			</scroll-view>
		</view>
		<view style="height:150rpx;"></view>
		<!-- 底部导航栏 -->
		<view class="bottom_nav" v-if="info && info.examine_status != 1">
			<view v-if="false" class="bottom_item" @click="newFollowClick">
				<image :src="BASE_IMG_URL+'/index/add.png'" class="botimg" mode=""></image>
				<view>写新跟进</view>
			</view>
			<view class="bottom_item" v-if="info.is_operation == 1 && (info.examine_status == 0 || info.examine_status == 2)" @click="toEditcontract(1)">
				<image :src="BASE_IMG_URL+'/edit.png'" class="botimg"></image>
				<view class="litext">编辑订单</view>
			</view>
			<view v-if="false" class="bottom_item" @click="showMoreOpeta">
				<image :src="BASE_IMG_URL+'/index/more-operation.png'" class="botimg" mode=""></image>
				<view>更多</view>
			</view>
		</view>
		<view class="bottom_nav" v-if="info && info.enable_apply_score == 1">
			<view class="bottom_item" @click="toApplyScore()">
				<image :src="BASE_IMG_URL+'/index/yeji2.png'" class="botimg"></image>
				<view class="litext">申请积分</view>
			</view>
		</view>
		<more-operation 
			ref="operationChild"
			:info="info" 
			:payment_approval="payment_approval"
			@toLookContract="toLookContract"
			@revokeContract="revokeContract"
			@uploadFile="uploadFile"
			@removeExamineP="removeExamine"
			@toRevokeContractP="toRevokeContract"
		></more-operation>
		
		<!-- 下载报价单 -->
		<uni-popup ref="downPopup" type="bottom" background-color="#fff" @touchmove.stop.prevent>
			<view class="acbox">
				<view class="acli" @click="onSelect('word')">word</view>
			</view>
		</uni-popup>
		<!-- 积分申请 -->
		<uni-popup ref="scoreApplyModal" type="center" :mask-click="false">
			<view class="score-apply-modal">
				<view class="modal-header">
					<view class="modal-title">积分申请</view>
					<view class="close-btn" @click="closeScoreApply">×</view>
				</view>

				<!-- 已有申请列表 -->
				<view class="existing-applications" v-if="applyList.length > 0">
					<view class="section-title">
						已申请列表
					</view>
					<scroll-view class="application-list-container" scroll-y="true">
						<view class="application-list">
							<view class="application-item" v-for="(apply, index) in applyList" :key="index">
								<view class="item-row">
									<text class="label">申请编码：</text>
									<text class="value">{{ apply.apply_code }}</text>
								</view>
								
								<view class="item-row">
									<text class="label">申请人：</text>
									<text class="value">{{ apply.admin.nickname }}</text>
								</view>
								
								<view class="item-row">
									<text class="label">申请积分：</text>
									<text class="value">{{ apply.total_score }}</text>
								</view>
								
								<view class="item-row">
									<text class="label">加赠积分：</text>
									<text class="value">{{ apply.add_score }}</text>
								</view>
								
								<view class="item-row">
									<text class="label">申请明细：</text>
									<view class="detail-list">
										<view v-for="(detail, detailIndex) in apply.apply_data" :key="detailIndex" class="detail-item">
											{{ detail.mobile }}：{{ detail.score }}积分{{ detail.addscore ? '+' + detail.addscore + '赠' : '' }}
										</view>
									</view>
								</view>
								
								<view class="item-row">
									<text class="label">申请时间：</text>
									<text class="value">{{ apply.createtime }}</text>
								</view>
								<view class="item-row">
									<text class="label">审核状态：</text>
									<text class="value">{{ apply.check_status_text }}</text>
								</view>
								
								<view class="item-row">
									<text class="label">赠送状态：</text>
									<text class="value" :class="{
										'status-success': apply.pay_status === 1,
										'status-pending': apply.pay_status === 0
									}">
										{{ apply.pay_status ? '已赠送' : '待赠送' }}
									</text>
								</view>
							</view>
						</view>
					</scroll-view>
				</view>
				<view class="new-application">
					<view class="modal-body">
						<view class="form-group">
							<view class="label">申请说明</view>
							<textarea v-model="applyData.remark" class="form-control" placeholder="请输入积分申请说明" />
						</view>
						
						<view class="form-group">
							<view class="label">申请明细</view>
							<view class="score-items">
								<view v-for="(item, index) in applyData.items" :key="index" class="score-item">
									<input v-model="item.mobile" placeholder="手机号" class="mobile-input" />
									<input v-model.number="item.score" placeholder="赠送积分" class="score-input" type="number" />
									<!-- <input type="hidden" v-model="item.remark" placeholder="备注" class="remark-input" /> -->
									<view class="btn-delete" @click="removeScoreItem(index)"><uni-icons type="trash" size="20"></uni-icons></view>
								</view>
							</view>
							<view class="add-btn" @click="addScoreItem">+ 添加</view>
						</view>
					</view>
					
					<view class="modal-footer">
						<view class="submit-btn" @click="submitScoreApply">提交申请</view>
					</view>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	import baseInfo from './baseInfo.vue'
	import { BASE_IMG_URL } from '@/api/http.js'
	import { netContractDetail, netCancelExamine, netApprovalDetail, netTerminationContract, 
	netPaymentList, netTakeContactStatus, netContractpassDetail, netPreviewContract,
	 netContractAddFile, netContractFileList, netContractDelFile, netContractStart, netPlanNopage, netScoreApply,netGetApplyList } from '@/api/api.js'
	import { mapState } from 'vuex'
	import { commonFun } from '@/common/navigate.js'
	import moreOperation from './moreOperation.vue'
	import followInfo from './follow_info.vue'
	
	export default {
		mixins:[commonFun],
		components: {
			baseInfo,
			moreOperation,
			followInfo
		},
		data() {
			return {
				BASE_IMG_URL:BASE_IMG_URL,
				id:'',   //订单id
				purchase_code:'',
				info:{},
				is_check_success:0,   //是否审核通过  0否   1是
				planList:[],
				showMore:false,
				remindPeople:[],
				examineType:'',
				payment_approval:{},   //审批流程
				//相关附件
				fileList:[],
				//回款计划
				plan_list:[],
				active:1,
				showScoreApply: false,
				applyData: {
					remark: '',
					items: []
				},
				applyList: [],  // 存储已有申请列表
			}
		},
		onLoad(options) {
			this.id = options.id
			this.purchase_code = options.purchase_code
			this.is_check_success = options.checkstatus
			uni.removeStorageSync('EditContract')
			uni.removeStorageSync('contractRemindlist')
		},
		onShow() {
			this.info = {}
			this.getDefaultRemind()
			//订单详情
			this.getInfo()
			//获取回款计划
			// this.getpayPlan()
			//获取回款记录
			this.getPlan()
			//审批流程
			this.getApprovalList()
			//相关附件列表
			this.getFileList()
		},
		onHide() {
		},
		onUnload() {
			uni.removeStorageSync('EditContract')
			uni.removeStorageSync('contractRemindlist')
		},
		
		methods: {
			changeTab(e) {
				this.active = e
			},
			//更多操作
			moreOperation() {
				this.$refs.morePopup.open()
			},
			//终止订单
			toRevokeContract() {
				uni.showModal({
					title:'提示',
					content:'请确认时候终止订单，终止之后订单将作废',
					success:(res)=>{
						if(res.confirm){
							netTerminationContract({contract_id:this.info.id}).then(res=>{
								uni.showToast({
									title:res.msg,
									icon:'none'
								})
								setTimeout(()=>{
									this.getInfo()
								},2000)
							})
						}
					}
				})
			},
			//撤回  审批
			removeExamine() {
				uni.showModal({
					title:'提示',
					content:'请确认是否撤回?',
					success:(res)=>{
						if(res.confirm){
							netCancelExamine({id:this.info.id}).then(res=>{
								uni.showToast({
									title: res.msg,
									icon:'none'
								})
								setTimeout(()=>{
									this.getInfo()
								},2000)
							})
						}
					}
				})
			},
			//更多操作
			showMoreOpeta() {
				this.$refs.operationChild.open()
			},
			//终止订单成功
			revokeContract() {
			},
			//上传附件成功
			uploadFile() {
				this.getFileList()
			},
			//获取附件列表
			getFileList() {
				// netContractFileList({contract_id:this.id}).then(res=>{
				// 	this.fileList = res.data
				// })
			},
			//删除附件
			delFile(id) {
				uni.showModal({
					title:'提示',
					content:'请确认是否删除附件?',
					success:(conres)=>{
						if(conres.confirm){
							netContractDelFile({id}).then(res=>{
								uni.showToast({
									title:res.msg,
									icon:'none'
								})
								setTimeout(()=>{
									//获取附件列表
									this.getFileList()
								},2000)
							})
						}
					}
				})
			},
			//查看附件
			toLookFile(item) {
				this.openFile({file:item.file_path,filename:item.name,type:item.types})
			},
			//上传附件
			toAddFile() {
				let fileUrl = this.toUploadFile((res)=>{
					let params = {
						contract_id:this.id,
						files:res.id
					}
					netContractAddFile(params).then(res=>{
						uni.showToast({
							title:res.msg,
							icon:'none'
						})
						setTimeout(()=>{
							this.$refs.morePopup.close()
							//获取附件列表
							this.getFileList()
						},2000)
					})
				})
			},
			
			toLookContract() {
				this.$refs.downPopup.open()
			},
			onSelect(type) {
				let params = {
					id:this.id,
					type
				}
				netPreviewContract(params).then(res=>{
					this.openFile({file:res.data.file,filename:res.data.filename,type:'file'})
				})
			},
			
			getApprovalList() {
				let params = {
					type: 'goods_sale',
					relation_id: this.id
				}
				netApprovalDetail(params).then(res=>{
					this.payment_approval = res.data
				})
			},
			//回款记录
			getPlan() {
				netPaymentList({contract_id:this.id,purchase_code:this.purchase_code,limit:100}).then(res=>{
					this.planList = res.data.data
					
				})
			},
			//回款计划
			getpayPlan() {
				netPlanNopage({
					contract_id: this.id,
				}).then(res => {
					this.plan_list = res.data
				})
			},
			//获取订单 详情信息
			getInfo() {
				netContractDetail({id:this.id}).then(res=>{
					this.info = res.data
				})
			},
			//订单审核通过  之后的详情
			getPassInfo() {
				netContractpassDetail({id:this.id}).then(res=>{
					res = res.data
					if(res.examine){
						let examine = res.examine.product
						let arr = res.customer_product
						examine.forEach(item=>{
							arr.forEach(ele=>{
								if(item.id == ele.id){
									ele.is_delete = true
								}else{
									ele.is_delete = false
								}
							})
						})
						res.customer_product = arr
					}
					this.info = res
				})
			},
			//客户信息
			toKehuInfo() {
				uni.navigateTo({
					url:'/pagesA/customerInfo/myCustomer/customerDetail?customerid='+this.info.customers_id
				})
			},
			//审核通过之后 修改订单
			toEditPassContract(id) {
				uni.navigateTo({
					url:'/pagesA/customerInfo/order/editExamineOrder?contractid='+id
				})
			},
			//通过
			toPass() {
				uni.navigateTo({    //status   1成功   2失败
					url:'/pages/template/examine?id='+this.id+'&type=contract&status=1'
				})
			},
			//拒绝
			toRefuse() {
				uni.navigateTo({    //status   1成功   2失败
					url:'/pages/template/examine?id='+this.id+'&type=contract&status=2'
				})
			},
			//生效订单 
			takeContract() {
				uni.showModal({
					title:'提示',
					content:'请确认订单是否生效?',
					success:(res)=>{
						if(res.confirm){
							let params = {
								contract_id: this.info.id
							}
							netTakeContactStatus(params).then(res=>{
								uni.showToast({
									title:res.msg,
									icon:'none'
								})
								setTimeout(()=>{
									this.getInfo()
								},2000)
							})
						}
					}
				})
			},
			//传阅
			toCirculate() {
				uni.navigateTo({
					url:'/pagesA/afterSales/moreOperation/circulate/index?id='+this.id+'&type=contract'
				})
			},
			//客户确认  发货
			toShencheng() {
				netContractStart({contract_id:this.id}).then(res=>{
					uni.showToast({
						title:res.msg,
						icon:'none'
					})
					setTimeout(()=>{
						uni.navigateTo({
							url:'/pagesA/afterSales/index'
						})
					},2000)
				})
			},
			//写  新跟进
			newFollowClick() {
				uni.navigateTo({
					url:'/pagesB/cluesManagement/newFllow?id='+this.id+'&type=3'
				})
			},
			//商机详情
			toBusinessDetail() {
				uni.navigateTo({
					url:'/pagesB/business/detail?id='+this.info.business.id
				})
			},
			toEditcontract(type) {
				//type 1编辑合同   2复制合同
				let arr = []
				uni.setStorageSync('EditContract',true)
				uni.setStorageSync('contractRemindlist', arr)
				uni.navigateTo({
					url:'/pagesA/customerInfo/order/editOrder?contractid='+this.info.id+'&type='+type,
				})
			},

			// 初始化申请数据
			initApplyData() {
				this.applyData = {
					remark: '',
					items: [{
						mobile: '',
						score: 0,
						remark: ''
					}]
				}
			},
			toApplyScore(){
				this.initApplyData();
				// 获取已有申请列表
				this.getExistingApplications();

				this.$refs.scoreApplyModal.open();
			},
			// 获取已有申请列表
			getExistingApplications() {
				try {
					netGetApplyList({ purchase_id: this.info.id }).then(res => {
						this.applyList = res.data.data || [];
					});
				} catch (err) {
					uni.showToast({ title: '获取申请记录失败', icon: 'none' });
					this.applyList = [];
				}
			},
			// 格式化明细显示
			formatDetail(detail) {
				return detail.map(d => 
					`${d.mobile}:${d.score}积分${d.addscore ? '+' + d.addscore + '赠' : ''}`
				).join('，');
			},
			// 关闭申请弹窗
			closeScoreApply() {
				this.$refs.scoreApplyModal.close();
			},
			
			// 添加积分项
			addScoreItem() {
				this.applyData.items.push({
					mobile: '',
					score: 0,
					remark: ''
				});
			},
			
			// 移除积分项
			removeScoreItem(index) {
				if (this.applyData.items.length > 1) {
					this.applyData.items.splice(index, 1);
				}
			},
			
			// 提交积分申请
			submitScoreApply() {
				// 验证数据
				if (!this.validateApplyData()) return;
				
				// 构造请求参数
				const params = {
					purchase_id: this.info.id,
					remark: this.applyData.remark,
					apply_data: this.applyData.items
				};
				
				// 调用API接口
				netScoreApply(params).then(res => {
					uni.showToast({ title: '申请成功' });
					this.closeScoreApply();
					// 刷新页面数据
					this.getInfo();
				}).catch(err => {
					uni.showToast({ title: '申请失败', icon: 'none' });
				});
			},
			
			// 数据验证
			validateApplyData() {
				// 手机号验证
				const mobileReg = /^1[3-9]\d{9}$/;
				
				for (let i = 0; i < this.applyData.items.length; i++) {
					const item = this.applyData.items[i];
					
					if (!item.mobile) {
						uni.showToast({ title: '请输入手机号', icon: 'none' });
						return false;
					}
					
					if (!mobileReg.test(item.mobile)) {
						uni.showToast({ title: '手机号格式不正确', icon: 'none' });
						return false;
					}
					
					if (!item.score || item.score <= 0) {
						uni.showToast({ title: '请输入正确的积分', icon: 'none' });
						return false;
					}
				}
				
				return true;
			}
		}
	}
</script>

<style lang="scss" scoped>
	.scrollbox{
		width:100%;
		height:calc(100vh - 100rpx);
		background:#f5f5f5;
	}
	.tabwarp{
		border-top:1rpx solid #f5f5f5;
		border-bottom:1rpx solid #f5f5f5;
	}
	//tab栏
	.tablist_new_list{
		padding:24rpx 10rpx;
		width:750rpx;
		display: flex;
		justify-content: space-around;
		align-items: center;
		border-bottom:1rpx solid #f5f5f5;
		background:#fff;
		.tabtn{
			flex-shrink: 0;
			width:170rpx;
			text-align: center;
			font-size:26rpx;
			color:#999;
			padding-bottom:20rpx;
			position: relative;
			&::after{
				content:'';
				position: absolute;
				left:50%;
				transform: translateX(-50%);
				bottom:0;
				width:80rpx;
				height:10rpx;
				background:#fff;
				border-radius: 10rpx;
			}
		}
		.tabtn_active{
			width:170rpx;
			text-align: center;
			font-size:26rpx;
			color:#333;
			padding-bottom:20rpx;
			position: relative;
			&::after{
				content:'';
				position: absolute;
				left:50%;
				transform: translateX(-50%);
				bottom:0;
				width:80rpx;
				height:10rpx;
				background:$uni-btn-bg-color;
				border-radius: 10rpx;
				opacity: 0.5;
			}
		}
	}
	.title{
		margin-left: -10rpx;
		display: flex;
		align-items: center;
		font-size: 26rpx;
		color: #666;
		&::before{
			content:'';
			position:absolute;
			left:30rpx;
			// top:26rpx;
			width:10rpx;
			height:25rpx;
			border-radius: 5rpx;
			background: $uni-text-color;
		}
	}
	// 跟多操作
	.more_opera{
		padding:70rpx 40rpx;
		width:750rpx;
		display: flex;
		justify-content: flex-start;
		align-items: center;
		.morebtn{
			text-align: center;
			color:#666;
			margin-right:60rpx;
			.botimg{
				width:40rpx;
				height:40rpx;
			}
		}
	}
	//附件列表
	.fileWarp{
		position: relative;
		margin-top: 20rpx;
		padding: 24rpx;
		box-shadow: 0px 0px 7rpx 0px rgba(0, 0, 0, 0.15);
		background-color: #fff;
		.file_title{
			font-size:30rpx;
			color:#333;
			font-weight: bold;
			border-bottom:1rpx solid #f5f5f5;
		}
		.doc_item{
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding:10rpx 35rpx;
			margin: 24rpx 0 24rpx 80rpx;
			width: 500rpx;
			border-radius: 10rpx;
			background-color: #F6F6F6;
			border-bottom:1rpx solid #f5f5f5;
			.remarkimg{
				width:25rpx;
				height:30rpx;
				margin-right:15rpx;
			}
			.deleimg{
				width:44rpx;
				height:44rpx;
			}
			.doc_name{
				width: 370rpx;
				white-space:nowrop;
				overflow:hidden;
				text-overflow:ellipsis;
				font-size:26rpx;
				color: $uni-text-color;
			}
		}
	}
	
	.warnstatus{
		color:#ec7f51;
	}
	.contractinfo{
		position: relative;
		padding:20rpx 24rpx;
		margin-bottom: 20rpx;
		width: 750rpx;
		background: #FFFFFF;
		border: 1px solid #FFFFFF;
		box-shadow: 0px 0px 7rpx 0px rgba(0, 0, 0, 0.15);
		background:#fff;
		.constatus{
			position:absolute;
			right:24rpx;
			top:24rpx;
			border-radius: 5px;
			font-size:24rpx;
			padding:2rpx 15rpx;
			color:$uni-text-color;
			background:$uni-bg-opacity;
		}
		.nameli{
			display: flex;
			justify-content: flex-start;
			align-items: center;
			margin-bottom:24rpx;
			.zhangimg{
				width:40rpx;
				height:40rpx;
				margin-right:15rpx;
			}
			.name{
				font-size:32rpx;
				color:#333333;
			}
		}
		.conbox{
			padding:0 45rpx;
			.conbox_top{
				display: flex;
				justify-content: space-between;
				align-items: center;
				.conbox_left{
					margin-left: 30rpx;
					.content{
						font-size:26rpx;
						color:#999;
						margin:15rpx 0;
						text{
							color:#333;
						}
					}
				}
				.conbox_right{
					font-size:34rpx;
					color:#F2533E;
				}
				.conmoneyth{
					font-size:24rpx;
					text-decoration: line-through;
				}
			}
			.content{
				font-size:26rpx;
				color:#999;
				margin:15rpx 0;
			}
		}
		.li_text{
			display: flex;
			justify-content: flex-start;
			align-items: center;
			.protext{
				font-size:24rpx;
				color:#666666;
				margin-right:24rpx;
			}
			.pro_out{
				width:150rpx;
				height:15rpx;
				border-radius: 8rpx;
				background:#DDDDDD;
				.pro_in{
					width:20%;
					height:15rpx;
					border-radius: 8rpx;
					background:$uni-text-color;
				}
			}
			.money{
				font-size:26rpx;
				color:$uni-text-color;
			}
		}
	}
	.tabinfo{
		position: relative;
		margin-bottom: 20rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding:20rpx;
		width: 750rpx;
		height: 100rpx;
		background: #FFFFFF;
		border: 1px solid #FFFFFF;
		box-shadow: 0px 0px 7rpx 0px rgba(0, 0, 0, 0.15);
		.tableft{
			display: flex;
			justify-content: space-between;
			align-items: center;
			width: 100%;
			.headerimg{
				width:45rpx;
				height:45rpx;
				border-radius: 50%;
			}
			.name{
				font-size:26rpx;
				color:$uni-text-color;
			}
		}
		.rightimg{
			width:32rpx;
			height:32rpx;
		}
	}
	.team_warp{
		padding:24rpx 35rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-bottom:1rpx solid #f5f5f5;
		.team_left{
			display: flex;
			justify-content: flex-start;
			align-items: center;
			.teamtit{
				font-size:26rpx;
				color:#666;
				margin-right:24rpx;
			}
			.teambox{
				width:430rpx;
				height:60rpx;
				.staffheader{
					display: flex;
					justify-content: flex-start;
					align-items: center;
					.staffimg{
						width:60rpx;
						height:60rpx;
						border-radius: 50%;
						margin-right:20rpx;
						flex-shrink: 0;
					}
				}
			}
		}
		.team_right{
			font-size:28rpx;
			color:#007AFF;
			font-weight: bold;
			flex-shrink: 0;
		}
	}
	
	.btnlist{
		padding:20rpx 24rpx;
		display: flex;
		justify-content: space-around;
		align-items: center;
		border-bottom:1rpx solid #F5F5F5;
		background:#fff;
		.btn{
			width:300rpx;
			height:60rpx;
			border-radius: 8rpx;
			font-size:24rpx;
			color:#fff;
			text-align: center;
			line-height: 60rpx;
		}
		.pass{
			background:#0287FF;
		}
		.refuse{
			background:#F2533E;
		}
	}
	.baseinfo{
		margin-top: 20rpx;
		.infotitle{
			font-size:32rpx;
			color:#0287FF;
			font-weight: bold;
			padding-left:30rpx;
			position: relative;
			&::before{
				content:'';
				width:15rpx;
				height:30rpx;
				background:#0287FF;
				border-radius: 10rpx;
				position: absolute;
				left:0;
				top:6rpx;
			}
		}
	}
	.bottom_nav {
		position: fixed;
		display: flex;
		bottom: 0;
		left: 0;
		right: 0;
		padding: 20rpx 0;
		background-color: #fff;
		text-align: center;
		color: #999;
		display: flex;
		justify-content: space-around;
		align-items: center;
		z-index: 2;
		border-top:1rpx solid #f5f5f5;
		.bottom_item {
			.botimg{
				width:40rpx;
				height:40rpx;
				margin-bottom:5rpx;
			}
		}
	}

	.pull_con {
		padding: 40rpx 0 10rpx;
		display: flex;
		flex-wrap: wrap;
		text-align: center;
		color: #999;

		.pull_item {
			width: 25%;

			:first-child {
				padding-bottom: 10rpx;
			}

			:last-child {
				padding-bottom: 50rpx;
			}
		}
	}
	.botimg{
		width:40rpx;
		height:40rpx;
	}
	.score-apply-modal {
		width: 90vw;
		background: #fff;
		border-radius: 16rpx;
		padding: 40rpx;
	}

	.modal-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 40rpx;
	}

	.modal-title {
		font-size: 32rpx;
		font-weight: bold;
		color: #333;
	}

	.close-btn {
		font-size: 40rpx;
		color: #999;
	}

	.form-group {
		margin-bottom: 30rpx;
		.label {
			font-size: 26rpx;
			color: #666;
			margin-bottom: 15rpx;
		}
	}
	.form-control {
		width: 95%;
		height: 80rpx;
		padding: 0 20rpx;
		border: 1rpx solid #e6e6e6;
		border-radius: 8rpx;
		font-size: 26rpx;
	}

	.score-items {
		border: 1rpx solid #e6e6e6;
		border-radius: 8rpx;
		padding: 20rpx;
		margin-bottom: 20rpx;
	}

	.score-item {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		margin-bottom: 20rpx;
		position: relative;
	}

	.mobile-input, .score-input, .remark-input {
		flex: 1;
		height: 60rpx;
		padding: 0 20rpx;
		margin-right: 20rpx;
		border: 1rpx solid #e6e6e6;
		border-radius: 6rpx;
		font-size: 24rpx;
		margin-bottom: 15rpx;
	}

	.btn-delete {
		flex: 0 0 10%;
		max-width: 10%;
		font-size: 24rpx;
		text-align: center;
	}

	.add-btn {
		color: #0287ff;
		font-size: 26rpx;
		margin-left: 20rpx;
	}

	.modal-footer {
		display: flex;
		justify-content: flex-end;
	}

	.submit-btn {
		padding: 20rpx 60rpx;
		background: #0287ff;
		color: #fff;
		border-radius: 8rpx;
		font-size: 28rpx;
	}

	.existing-applications {
		margin-bottom: 40rpx;
	}

	.section-title {
		font-size: 28rpx;
		font-weight: bold;
		color: #333;
		margin-bottom: 20rpx;
		padding-bottom: 10rpx;
		border-bottom: 1rpx solid #eee;
	}
	.application-list-container {
		height: 500rpx; /* 可视区域高度 */
		overflow: hidden;
	}

	.application-list {
		border: 1rpx solid #eee;
		border-radius: 8rpx;
		padding: 20rpx;
	}

	.application-item {
		background: #f7f8fa;
		border-radius: 6rpx;
		padding: 20rpx;
		margin-bottom: 20rpx;
	}

	.item-row {
		display: flex;
		align-items: center;
		margin-bottom: 15rpx;
		font-size: 24rpx;
		color: #666;
	}

	.label {
		width: 140rpx;
		color: #999;
	}

	.value {
		flex: 1;
		color: #333;
	}

	.detail-list {
		flex: 1;
	}

	.detail-item {
		margin-bottom: 10rpx;
	}

	.status-success {
		color: #00c97f;
	}

	.status-pending {
		color: #ec7f51;
	}
</style>
